<?php

namespace app\api\model;

use think\Exception;
use think\Model;


class Order_news extends Model
{

    // 表名
    protected $name = 'order_news';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
//    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [];

    public static function  new_add($user_id,$order_id,$order_sn,$type,$status,$content){
        $data = [
            'user_id'  => $user_id,
            'order_id' => $order_id,
            'order_sn' => $order_sn,
            'content'  => $content,
            'type'     => $type,
            'status'   => $status,
            'createtime' => time()
        ];
        self::insert($data);

    }



}
